
package com.insigma.business.qrcode.common.dto;


import com.insigma.business.qrcode.common.vo.DescEnum;

import java.util.LinkedHashMap;
import java.util.Map;


public enum BuriedPointTypeEnum implements DescEnum {

    
    MERCHANT("商家"),

    
    JOB("工作"),

    
    PB_CLASS("党建课程"),

    
    PB_NEWS("新闻"),

    
    SOLDIER("老兵"),
    ;

    BuriedPointTypeEnum(String desc) {
        this.desc = desc;
    }

    
    private String desc;

    @Override
    public String getDesc() {
        return desc;
    }

    
    public static BuriedPointTypeEnum getByEnumName(final String enumName) {
        for (BuriedPointTypeEnum element : values()) {
            if (element.name().equals(enumName)) {
                return element;
            }
        }
        return null;
    }

    
    public static Map<String, String> getName2DescMap() {
        Map<String, String> name2DescMap = new LinkedHashMap<>();
        for (BuriedPointTypeEnum element : values()) {
            name2DescMap.put(element.name(), element.desc);
        }

        return name2DescMap;
    }

}
